package com.czh.mybatisplus.config;

import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.p6spy.engine.spy.appender.MessageFormattingStrategy;

public class logFormatConfig implements MessageFormattingStrategy{

        public logFormatConfig() {

        }

        public String formatMessage(int connectionId, String now, long elapsed, String category, String prepared, String sql, String url) {
            return StringUtils.isNotBlank(sql) ? " 耗时：" + elapsed + " ms（毫秒） " : "";
        }
}
